import type { PatientItem, PatientParams } from "@/types/patient";
import { request } from "@/utils/http";

export const addPatientApi = (data: PatientParams) => request.post('/patient/add', data)

export const patientListApi = () => request.get<null, PatientItem[]>('/patient/mylist')

export const removePatientApi = (id: string) => request.delete(`/patient/del/${id}`)

export const patientDetailApi = (id:string) => request.get<null, PatientParams>(`/patient/info/${id}`)

export const updatePatientApi = (data: PatientParams) =>  request.put(`/patient/update`, data)

